package com.example.szh.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.szh.R;
import com.example.szh.entity.VideoNewsEntity;
import com.example.szh.utils.LoadImage;

import org.greenrobot.greendao.annotation.NotNull;

public class SmallAdapter extends BaseQuickAdapter<VideoNewsEntity.Values, BaseViewHolder> {


    public SmallAdapter(int layoutResId) {
        super(R.layout.item_small_video);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, VideoNewsEntity.Values values) {
        baseViewHolder.setText(R.id.item_small_tv,values.news_title);
        ImageView img = baseViewHolder.getView(R.id.item_small_img);
        LoadImage.loadMatchImg(values.medias.get(0).media_url,img);
    }
}
